﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using PloobsEngine.SceneControl;
using PloobsEngine.Physics;
using PloobsEngine.Physics.XJigLib;

namespace Etapa1.SteeringExperiments
{

    /// <summary>
    /// NOT YET WORKING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    /// </summary>
    public class ObstacleAvoidance : Steering
    {
        public ObstacleAvoidance(IWorld world)
            : base(BehaviorType.obstacle_avoidance)
        {
            this.world = world;
        }

        private IWorld world;

        public override Microsoft.Xna.Framework.Vector3 CalculateSteering(SteeringEntityInfo entity)
        {
            IPhysicObject po = entity.Obj.PhysicObject;
            Vector3 side = po.BoundingBox.Max - po.BoundingBox.Min;
            BoxObject bo = new BoxObject(side, po.Position, po.Rotation, po.Scale * new Vector3(1,1,1));
            List<IPhysicObject> pos = world.PhysicWorld.DetectCollisions(bo);            
            return Vector3.Zero;
        }

    }
}
